.container {
  display: flex;
  flex-direction: column;
  height: 98vh;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: 70px;
}

.main-upper {
  height: 10%;
  display: flex;
  align-items: flex-start;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #fff;
}

.main-lower {
  height: 90%;
  display: flex;
}

.main-left,
.main-center,
.main-right {
  height: 100%;
}

.main-left {
  width: 50%;
  margin-left: 20px;
}

.main-center {
  width: 50%;
  margin-right: 20px;
  margin-top: 11px;
}

.image-slider {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.image-slider img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
}

.prev-button,
.next-button {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  top: 50%;
  transform: translateY(-50%);
}

.prev-button {
  left: 10px;
}

.next-button {
  right: 10px;
}

.image-info {
  position: absolute;
  bottom: 10px;
  text-align: center;
  width: 100%;
  font-size: 16px;
  color: #333;
  z-index: 10;
}

.dot {
  display: inline-block;
  margin: 0 5px;
  color: #bbb;
  transition: font-size 0.3s, color 0.3s;
}

.dot.active {
  color: #333;
}

.product-info {
  font-size: 16px;
  color: #333;
  margin-bottom: 20px;
}

.product-info h2 {
  margin-top: 0;
  font-size: 24px;
  color: #000;
}

.product-info p {
  margin: 8px 0;
}

.product-info strong {
  font-weight: bold;
  color: #555;
}

.goods-details-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 50px;
  margin-bottom: 20px;
}

.goods-details-table td {
  padding: 10px;
  border: 1px solid #ddd;
}

.comments-section {
  display: flex;
  flex-direction: column;
  height: 400px; /* 固定高度 */
  border: 1px solid #ddd;
  margin-bottom: 20px;
  margin-top: 15px;
}

.comments-display {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.comment {
  padding: 5px 0;
  border-bottom: 1px solid #eee;
}

.comment-input {
  display: flex;
  border-top: 1px solid #ddd;
  padding: 10px;
}

.comment-input textarea {
  flex: 1;
  resize: none;
  padding: 5px;
}

.comment-input button {
  padding: 5px 10px;
  margin-left: 10px;
}

.action-buttons {
  display: flex;
  justify-content: center;
}

.buy-now-button,
.add-to-cart-button {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  cursor: pointer;
  margin: 0; /* 去除默认间距 */
  border-radius: 0; /* 去除按钮的圆角 */
}

.buy-now-button {
  background-color: #ff4d4d;
  color: white;
  border-right: 1px solid white; /* 添加右边框以区分按钮 */
}

.add-to-cart-button {
  background-color: #4caf50;
  color: white;
}

.comment-item {
  padding: 5px 0;
  border-bottom: 1px solid #eee;
}

.replies {
  margin-top: 5px;
  border-left: 1px solid #ddd;
  padding-left: 20px; /* 调整子评论的缩进 */
}

.toggle-button {
  background: none;
  border: none;
  color: blue;
  cursor: pointer;
  padding: 5px 0;
  margin-top: 5px;
  text-align: left;
}

.comments__comment, .comments__reply {
  display: flex;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #fff;
}
.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 10px;
}
.reply-button {
  background: none;
  border: none;
  color: blue;
  cursor: pointer;
  padding: 5px;
  font-size: 14px;
}
.show, .back {
  background: none;
  border: none;
  color: blue;
  cursor: pointer;
}

.user-avatar {
  width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background-color: gray;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin-top: 2px;
}

.user-avatar img {
  width: 100%;
    height: 100%;
    border-radius: 50%;
}
.user-avatar:hover{
  opacity: 0.8;
}

.user-info {
  font-size: 14px;
  display: flex; /* 使用 Flexbox 布局 */
  gap: 20px; /* 设置子元素之间的间距 */
}

.user-info p {
  margin: 0;
}

.user-info strong {
  margin-right: 5px;
}
.upUsername{
  background: none;
  border: none;
  cursor: pointer;
  font-size: 23px; /* 设置按钮的字体大小 */
  margin-left: 10px;
}
.nowAddress,.nowAccountAge{
  display: flex;
  align-items: center; /* 垂直居中对齐 */
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: lavender;
  margin-top: 15px;
  margin-left: 10px;
}

.action-buttons-group {
  display: flex; /* 使用 Flexbox 布局 */
  flex-direction: column; /* 竖直排列按钮 */
  gap: 1px; /* 设置按钮之间的间距 */
  align-items: flex-end; /* 使按钮在容器内右对齐 */
  margin-left: auto; /* 将按钮组推到容器的右边 */
}

.follow-seller-button,
.contact-seller-button {
  margin-top: 3px;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}

.follow-seller-button {
  background-color: #007bff; /* 设置背景颜色 */
  color: #fff; /* 设置文字颜色 */
}

.contact-seller-button {
  background-color: #28a745; /* 设置背景颜色 */
  color: #fff; /* 设置文字颜色 */
}
.username-collect{
  display: flex;
  flex-direction:row;
}

.goodsDetail-collect-add,.goodsDetail-collect-delete{
  cursor: pointer;
  margin-top: 3.5px;
  margin-left: 15px;
}